<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<!-- BEGIN HEAD -->
<head>
    <title>DL绩效管理系统</title>
    <%@ include file="/WEB-INF/inc/include.jsp"%>
    
    <style type="text/css">
    .logo {font-size:25px;}
    .logo img{padding-right:15px;}
    .logo {color:#fff;}
    .error{	font-size: 12px;
	color: red;
	margin-left: 10px;}
    </style>
</head>
<!-- END HEAD -->

<body class="login">
    <div class="logo">
        <span style="line-height:38px;">DL绩效管理系统</span>
    </div>
    <div class="content">
        <form class="login-form" method="post">
            <h3 class="form-title">用户登录</h3>
            <div class="alert alert-danger display-hide">
                <button class="close" data-close="alert"></button>
                <span> 输入用户名. </span>
            </div>
<!--             <div class="form-group">
                <label class="control-label visible-ie8 visible-ie9">厂别</label>
                <div class="input-icon">
                    <select class="form-control placeholder-no-fix" id="factory" name="factory" >
						<option value="">选择厂别</option>
						<option value="ARY">ARY</option>
						<option value="CEL">CEL</option>
						<option value="LCM">LCM</option>
                    </select>
               	</div>
            </div> -->
            <div class="form-group">
                <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                <label class="control-label visible-ie8 visible-ie9">用户名</label>
                <div class="input-icon">
                    <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" id="loginName" name="loginName" value="${requestScope.username}"/>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label visible-ie8 visible-ie9">密码</label>
                <div class="input-icon">
                    <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="密码" id="pass" name="pass" />
               	</div>
            </div>
            <div class="form-actions">
               	<div class="btn-group btn-group-devided">
               		<button type="reset"  class="btn red">重置</button>
	                <button type="button" class="btn green" onclick="commit()"> 登录 </button>
                </div>
                <em id="error" class="error"> ${requestScope.error} </em>
            </div>
        </form>
    </div>
</body>
<script type="text/javascript">

	function commit() {
		var x = validation();
		if (typeof (x) != "undefined")
			document.getElementById("error").innerHTML = x;
		else
			document.forms[0].submit();
	}
	function validation() {
/* 		if (document.getElementById("factory").value == "")
			return "厂别不能为空"; */
 		if (document.getElementById("loginName").value == "")
			return "工号不能为空";
		if (document.getElementById("pass").value == "")
			return "密码不能为空"; 
	}
/* 	$(document).keyup(function(e) {
        if (e.keyCode == "13") {
            //回车执行查询
            $(".btn").click();
        }
    }); */
</script>
</html>